package chances.epg.entity.content;

import java.math.BigDecimal;
import java.text.NumberFormat;

public class ProgramOffering {
	private String offeringId;
	private String serviceType;
	private String contentCode;
	private String serviceName;
	private String serviceCode;
	private Integer price;
	private Integer suggestedPrice;// 建议价格,单位 分;
	private Integer rentalDuration;
	private String reserve1;
	private String reserve2;
	private String reserve3;
	private String reserve4;
	private String reserve5;
	
	private String priceText;
	
	public Integer getRentalDuration() {
		return rentalDuration;
	}
	public void setRentalDuration(Integer rentalDuration) {
		this.rentalDuration = rentalDuration;
	}
	public Integer getPrice() {
		return price;
	}
	public void setPrice(Integer price) {
		this.price = price;
	}
	public String getPriceText() {
	    BigDecimal b1 = new BigDecimal(this.price);
        BigDecimal b2 = new BigDecimal(100);
        double price = b1.divide(b2,2,BigDecimal.ROUND_HALF_UP).floatValue();
        
        NumberFormat nbf= NumberFormat.getInstance(); 
        nbf.setMinimumFractionDigits(2); 
        this.priceText = nbf.format(price);
        return priceText;
	}
	public void setPriceText(String priceText) {
		this.priceText = priceText;
	}
	public Integer getSuggestedPrice() {
		return suggestedPrice;
	}
	public void setSuggestedPrice(Integer suggestedPrice) {
		this.suggestedPrice = suggestedPrice;
	}
	public String getOfferingId() {
		return offeringId;
	}
	public void setOfferingId(String offeringId) {
		this.offeringId = offeringId;
	}
	public String getServiceType() {
		return serviceType;
	}
	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}
	public String getContentCode() {
		return contentCode;
	}
	public void setContentCode(String contentCode) {
		this.contentCode = contentCode;
	}
	public String getServiceName() {
		return serviceName;
	}
	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}
	public String getServiceCode() {
		return serviceCode;
	}
	public void setServiceCode(String serviceCode) {
		this.serviceCode = serviceCode;
	}
	public String getReserve1() {
		return reserve1;
	}
	public void setReserve1(String reserve1) {
		this.reserve1 = reserve1;
	}
	public String getReserve2() {
		return reserve2;
	}
	public void setReserve2(String reserve2) {
		this.reserve2 = reserve2;
	}
	public String getReserve3() {
		return reserve3;
	}
	public void setReserve3(String reserve3) {
		this.reserve3 = reserve3;
	}
	public String getReserve4() {
		return reserve4;
	}
	public void setReserve4(String reserve4) {
		this.reserve4 = reserve4;
	}
	public String getReserve5() {
		return reserve5;
	}
	public void setReserve5(String reserve5) {
		this.reserve5 = reserve5;
	}
}
